Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ch10-00-generics.md #769

Merged
merged 1 commit into from
Feb 17, 2024
Merged

Update ch10-00-generics.md #769

merged 1 commit into from
Feb 17, 2024

Conversation

green961
Copy link
Contributor

https://kaisery.github.io/trpl-zh-cn/ch10-00-generics.html

在示例 10-3 的程序中将寻找最大值的代码提取到了一个叫做 largest 的函数中。接着我们调用了示例 10-2 中寻找两个列表中最大值的函数。之后也可以将该函数用于任何可能的 i32 值的列表。

https://doc.rust-lang.org/book/ch10-00-generics.html

In Listing 10-3, we extract the code that finds the largest number into a function named largest. Then we call the function to find the largest number in the two lists from Listing 10-2. We could also use the function on any other list of i32 values we might have in the future.

@KaiserY KaiserY merged commit e16447c into KaiserY:main Feb 17, 2024
1 of 2 checks passed
@green961 green961 deleted the patch-2 branch February 17, 2024 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants